<?php
/**
 * Sharing.php 
 *
 */

function my_link() {
	if(is_single()) {
		the_permalink();
	} else {
		bloginfo("url"); 
	}
}

function my_title() {
	if(is_single()) {
		the_title();
	} else {
		bloginfo("name");
	}
}

?>

<ul>
	<li class="facebook"><a title="Share on Facebook" href="http://www.facebook.com/sharer.php?u=<?php my_link(); ?>&amp;title=<?php my_title(); ?>" target='_blank'><span>Share on Facebook</span></a></li>
	
	<li class="delicious"><a title="Share on Delicious" href="http://del.icio.us/post?url=<?php my_link(); ?>&amp;title=<?php my_title(); ?>" target='_blank'><span>Share on Delicious</span></a></li>
	
	<li class="twitter"><a title="Share on Twitter" href="http://twitter.com/home?status=RT%20<?php my_title(); ?>%20<?php my_link(); ?>" target='_blank'><span>Share on Twitter</span></a></li>
	
	<li class="digg"><a title="Share on Digg" href="http://digg.com/submit?url=<?php my_link(); ?>&amp;title=<?php my_title(); ?>&amp;topic=design" target='_blank'><span>Share on Digg</span></a></li>
</ul>